home *** CD-ROM | disk | FTP | other *** search
- Program Spooler_Test;
-
- uses CRT,ESpooler;
-
-
- VAR
- Ch : Char;
- X,Result : integer;
- splstat : SplStatType;
-
-
- BEGIN
- DirectVideo := FALSE;
- FOR X := 1 to 10 DO { Write out ten lines of text to main memory spooler. }
- BEGIN
- Writeln(SPL,'Hello, Hello, is there anybody out there ? ',X,' ',Memavail);
- Writeln(X);
- END;
- Spoolerstatus(splstat);
-
- While splstat.BytesToPrint <> 0 DO { Wait while spooler empties }
- BEGIN { before going on. }
- Spoolerstatus(splstat);
- GotoXY(40,Wherey);
- Write('Bytes left to print : ',splstat.BytesToPrint:6);
- END;
- Writeln;
-
- Close(Spl); { To change spooler mode, first close it. }
-
- { Check and see if there's an expanded memory manager loaded, and that
- there's enough memory available for the spooler. }
-
- IF Spool_In_EMS(32768) <> 0 THEN
- Writeln( 'EMS spooler not installed.')
- ELSE
- BEGIN
- Rewrite(SPL);
- Writeln('Spooling in EMS. ');
- FOR X := 11 to 20 DO
- BEGIN
- Writeln(SPL,'Spooled in EMS. Hello, Hello, is there anybody out there ? ',X,' Mem Avail ',memavail);
- Writeln(X);
- END;
- Spoolerstatus(splstat);
-
- While splstat.BytesToPrint <> 0 DO
- BEGIN
- Spoolerstatus(splstat);
- GotoXY(40,Wherey);
- Write('Bytes left to print : ',splstat.BytesToPrint:6);
- END;
- Writeln;
- Close(SPL);
- END;
-
- IF Spool_In_XMS(16384) <> 0 THEN
- Writeln( 'XMS spooler not installed.')
- ELSE
- BEGIN
- Rewrite(SPL);
- Writeln('Spooling in XMS. ');
- FOR X := 21 to 30 DO
- BEGIN
- Writeln(SPL,'Spooled in XMS. Hello, Hello, is there anybody out there ? ',X,' Mem Avail ',memavail);
- Writeln(X);
- END;
- Spoolerstatus(splstat);
- While splstat.BytesToPrint <> 0 DO
- BEGIN
- Spoolerstatus(splstat);
- GotoXY(40,Wherey);
- Write('Bytes left to print : ',splstat.BytesToPrint:6);
- END;
- Writeln;
- Close(SPL);
- END;
-
-
- Direct_To_Printer; { Send output direct to the printer. }
- Rewrite(SPL);
- FOR X := 31 to 40 DO
- BEGIN
- Writeln(SPL,'Direct to printer. Is there anybody out there ? ',X,' Mem Avail ',memavail);
- Writeln(X);
- END;
- Writeln('Finished.');
- END.